package com.itelecom.oss.mobile.services;

import java.util.List;

import com.itelecom.oss.mobile.dao.WebServiceDAO;
import com.itelecom.oss.mobile.dao.WebServiceDAOImpl;
import com.itelecom.oss.mobile.domains.DeviceForMobile;
import com.itelecom.oss.mobile.domains.Users;

public class LoginService {
	private String login;
	private String password;
	private Users triesToLogin;
	private WebServiceDAO webServiceDAO;
	
	public LoginService(String login, String password){
		setLogin(login);
		setPassword(password);
		triesToLogin=new Users(login,password);
		webServiceDAO=new WebServiceDAOImpl();
	}
	
	public Boolean check(){
//		return webServiceDAO.findUserWithPassword(getTriesToLogin());
//	TODO Remove stub.
		return true;
		}

		
	
	
	public List<DeviceForMobile> getDevices(){
		return webServiceDAO.findDevicesByState("state");
	}
	
	private void setPassword(String password) {
		this.password = password;
	}
	private String getPassword() {
		return password;
	}
	private void setLogin(String login) {
		this.login = login;
	}
	private String getLogin() {
		return login;
	}

	private void setTriesToLogin(Users triesToLogin) {
		this.triesToLogin = triesToLogin;
	}

	private Users getTriesToLogin() {
		return triesToLogin;
	}
	


}
